begintalkscript;

variables;
short leadchar,bmessage,pcs,heal_rest,living_pcs;
string custom_m;

begintalknode 1;
	state = -1;
	nextstate = 1;
	question = "Mayor Candice";
	text1 = "This woman seems buried in paperwork.  It must be difficult, organizing a city under complete siege.";
	text2 = "She seems fairly confident in herself, however.  Most administrators would not expect to do half as much for their respective frontier towns, and yet this gal is going well above the call of duty without even a grumpy frown.";
	text5 = "The Mayor of Sunset Creek is still sitting here, sorting through paperwork.";
	code = 
		if(get_flag(1,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(1,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 2;
	state = 1;
	nextstate = -1;
	condition = get_flag(29,0) == 0;
	question = "Hello, ma'am.";
	text1 = "She ignores me.  Perhaps I should step into her office first.";
	text2 = "She ignores us.  Perhaps I should step into her office first.";
	action = END_TALK;
	code = 
		if(party_size() == 1)
			remove_string(2);
		else
			remove_string(1);
break;

begintalknode 3;
	state = 1;
	nextstate = 1;
	condition = (get_flag(29,0) > 0) && (get_flag(30,0) == 0);
	question = "Hello, ma'am.";
	text1 = "The woman raises her head.  _Wh...  what?  I don't know you.  Who are you?  Why are you in my office?  Nevermind that, how did you get here?_";
	code = 
		set_flag(30,0,1);
break;

begintalknode 4;
	state = 1;
	nextstate = 1;
	condition = (get_flag(29,0) > 0) && (get_flag(30,0) == 1);
	question = "(Explain the situation)";
	text1 = "_Anyway, as much as I appreciate what you've done, I have work to do, so if you'll excuse me._";
	code = 
		reset_dialog();
		if(party_size() == 1){
			add_dialog_str(0,"First, I begin explaining to her about the letter I received from this province's Imperial Liason.  She already seems skeptical.",0);
			add_dialog_str(1,"_Pardon me, 'friend,' but this is not a province, it is a colony.  We don't have an Imperial Liason.  Plus, this letter addresses you by name, even though you've never been here in your life._",0);
			add_dialog_str(2,"_Where did you get this letter, really?_",0);
			add_dialog_choice(0,"Um...  Sorry, ma'am, I don't know.");
		}
		if(party_size() > 1){
			add_dialog_str(0,"First, we begin explaining to her about the letter we received from this province's Imperial Liason.  She already seems skeptical.",0);
			add_dialog_str(1,"_Pardon me, 'friends,' but this is not a province, it is a colony.  We don't have an Imperial Liason.  Plus, this letter addresses you by your names, even though you've never been here in your life._",0);
			add_dialog_str(2,"_Where did you get this letter, really?_",0);
			add_dialog_choice(0,"Um...  Sorry, ma'am, we don't know.");
		}
		bmessage = run_dialog(1);

		reset_dialog();
		add_dialog_str(0,"_Fine.  You look dumbfounded enough that I'm willing to believe you.  Let's just say that how you got here was a miracle-- what else happened?_",0);
		if(party_size() == 1)
			add_dialog_str(1,"I tell her about General Abidan's ravaged homestead, the brigands waiting for me on the road, and the sniper with the magical device guarding the road.  She seems horrified.",0);
		if(party_size() > 1)
			add_dialog_str(1,"We tell her about General Abidan's ravaged homestead, the brigands waiting for me on the road, and the sniper with the magical device guarding the road.  She seems horrified.",0);
		add_dialog_str(2,"_The General is dead?  Goddamnit.  And they have magic-wielding snipers now?  Well, at least we know just how absolutely hopeless things are becoming.  But go on._",0);
		if(party_size() == 1)
			add_dialog_str(3,"I finish by telling her about how I met Hoppston on the shore of the river, and how I was ambushed by the brigands, barely making it here unmolested.",0);
		if(party_size() > 1)
			add_dialog_str(3,"We finish by telling her about how we met Hoppston on the shore of the river, and how we were ambushed by the brigands, barely making it here unmolested.",0);
		bmessage = run_dialog(1);

		reset_dialog();
		if(party_size() == 1)
			add_dialog_str(0,"The woman finally pulls her hands from the top of her head and looks up at me from her seat.  _Well, thank you anyway.  I'm Mayor Candice, and considering all you've done, it's a pleasure meeting you._",0);
		if(party_size() > 1)
			add_dialog_str(0,"The woman finally pulls her hands from the top of her head and looks up at us from her seat.  _Well, thank you anyway.  I'm Mayor Candice, and considering all you've done, it's a pleasure meeting you._",0);
		add_dialog_str(1,"_Anyway, I can't give you much for your efforts since we're using practically every usable piece of equipment we've got, but here._  She reaches into a side pocket and pulls out a polished, steel key and hands it to me.",0);
		add_dialog_str(2,"_This will open up the storerooms across the street and down some stairs inside.  You probably won't have much of a use for what we've got, but feel free to take it anyway._",0);
		add_dialog_str(3,"_Unfortunately, I'm not sure when you'll be able to leave this place, but thanks for the help you've given us anyway.  Now if you'll excuse me._",0);
		add_dialog_str(4,"Mayor Candice lowers her head again and goes back to her work.",0);
		bmessage = run_dialog(1);

		set_flag(30,0,2);
		change_spec_item(1,1);
		toggle_quest(0,0);
		award_party_xp(500,25);
		award_party_xp(500,25);

break;

begintalknode 5;
	state = 1;
	nextstate = -1;
	condition = (get_flag(29,0) > 0) && (get_flag(30,0) >= 2);
	question = "Do you get much sleep?";
	text1 = "Candice points below her right eye with her index finger, revealing a large bag hanging below it as she scowls lightly.  _I am not getting much sleep.  Sorry if I'm not looking fresh._";
	text5 = "_No, I'm still exhausted.  But I'll live.  Honestly._";
	code = 
		if(get_flag(2,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(2,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 6;
	state = 1;
	nextstate = -1;
	condition = (get_flag(29,0) > 0) && (get_flag(30,0) >= 2) && (get_flag(31,0) == 0);
	question = "Is there anything that can be done to help this city?";
	text1 = "_If you're honestly interested, I'd recommend talking to Rupert.  He might be able to give you something to do, though I doubt it._";
	code = 
		set_flag(31,0,1);
break;

begintalknode 7;
	state = 1;
	nextstate = -1;
	condition = (get_flag(29,0) > 0) && (get_flag(30,0) >= 2);
	question = "How did all of this happen?";
	text1 = "_Well, one day everything was fine, and then these brigands began charging us from the forests to the north.  We were barely able to put up wooden pallisades._";
	text2 = "_Fortunately, we had plenty of soldiers here, so we were able to repel their first attacks.  Unfortunately, we seem to be both outnumbered and outgunned.  You may want to talk to Captain Rupert about this._";
	text5 = "_Talk to Rupert.  He knows more about this than I do._";
	code = 
		if(get_flag(3,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(3,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 8;
	state = 1;
	nextstate = -1;
	condition = (get_flag(29,0) > 0) && (get_flag(23,0) >= 1);
	question = "The brigand army has been cleared.";
	text1 = "Mayor Candice leaps out of her chair and shakes my hand almost violently.  _Thank you...  Thank you.  That was a positively amazing thing to do._";
	text2 = "Mayor Candice leaps out of her chair and shakes our hands almost violently.  _Thank you...  Thank you.  That was a positively amazing thing to do._";
	text3 = "_I don't know how I might be able to repay you for services rendered, but Captain Rupert might.  Of course, this doesn't end our struggles against the brigands...  But it does make things far easier._";
	text5 = "_Yes they have.  Again, I thank you.  But with your permission, I must return to my work._";
	code = 
		if(party_size() == 1)
			remove_string(2);
		else
			remove_string(1);
		if(get_flag(4,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(4,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
		if(get_flag(23,0) == 1)
			set_flag(23,0,2);
break;

begintalknode 9;
	state = 1;
	nextstate = -1;
	condition = (get_flag(29,0) > 0) && (get_flag(30,0) >= 2);
	question = "What do you do here?";
	text1 = "_Not that I have time to tell you everything, but I manage every non-military aspect of the city._";
	text2 = "_For instance, I make sure that we have enough food by rationing it.  The average person here eats, say, four to five fish a day.  That requires a great deal of organization in when we fish._";
	text3 = "_Also, the palisades are constantly under attack, and I must make sure that we ration our lumber.  We don't have much since we can't leave the city to get any more._";
	text4 = "_Finally, I manage a slew of paperwork.  Not as much as we might have if we were actually a province, but it still has to get done._";
	text5 = "_I do plenty of stuff domestically.  Basically anything that doesn't involve killing the enemy, I do._";
	code = 
		if(get_flag(5,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(5,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 10;
	state = 1;
	nextstate = -1;
	condition = ((get_flag(31,0) == 0) && (party_size() == 1)) && ((get_flag(29,0) > 0) && (get_flag(30,0) >= 2));
	question = "Is there any way I can help?";
	text1 = "Candice looks at me as if I were somewhat insane.  Then, she snaps off a dry string of mirth.  _You...  you're a funny one, alright._";
	text2 = "_I doubt you're much good at fishing, but Captain Rupert might have something for you to do.  Why don't you ask him?_";
	code = 
		set_flag(31,0,1);
break;

begintalknode 11;
	state = 1;
	nextstate = -1;
	condition = ((get_flag(31,0) == 0) && (party_size() > 1)) && ((get_flag(29,0) > 0) && (get_flag(30,0) >= 2));
	question = "Is there any way we can help?";
	text1 = "Candice looks at me as if I were somewhat insane.  Then, she snaps off a dry string of mirth.  _You...  you're funny ones, alright._";
	text2 = "_I doubt you're much good at fishing, but Captain Rupert might have something for you to do.  Why don't you ask him?_";
	code = 
		set_flag(31,0,1);
break;

begintalknode 20;
	state = -1;
	nextstate = 4;
	question = "Captain Rupert";
	text1 = "This man is patiently poring over a map of the area with red and blue blocks stationed around various points.  He has a stack of reports scattered around the map.";
	text2 = "He's pretty good at ignoring me.  Not that I can blame him:  Being the military commander of a besieged city must be nerve-wracking, after all.";
	text3 = "He's pretty good at ignoring us.  Not that we can blame him:  Being the military commander of a besieged city must be nerve-wracking, after all.";
	text4 = "He looks to be preparing for combat, wearing full regalia, but it's apparent from the bags under his eyes and his jittery disposition that putting a sword in his hands would be a waste of good metal.  The siege has not been kind to him.";
	text5 = "The Captain is still sitting here with his maps, shifting troops around and occasionally marking down some chicken-scratch on an old reconnaissance report.";
	code = 
		if(get_flag(6,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(6,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
		if(party_size() == 1)
			remove_string(2);
		else
			remove_string(3);
break;

begintalknode 21;
	state = 4;
	nextstate = -1;
	condition = get_flag(29,0) == 0;
	question = "Hello there.";
	text1 = "He ignores me.  Maybe I should step into his office first.";
	text2 = "He ignores us.  Maybe we should step into his office first.";
	action = END_TALK;
	code = 
		if(party_size() == 1)
			remove_string(2);
		else
			remove_string(1);
break;

begintalknode 22;
	state = 4;
	nextstate = -1;
	condition = ((get_flag(29,0) == 1) && (get_flag(34,0) == 0)) && (get_flag(30,0) < 2);
	question = "Hello there.";
	text1 = "_Pardon me, but could you please speak to Mayor Candice first?  Thank you._";
	action = END_TALK;

begintalknode 23;
	state = 4;
	nextstate = 5;
	condition = ((get_flag(29,0) == 1) && (get_flag(34,0) == 0)) && (get_flag(30,0) >= 2);
	question = "Hello there.";
	text1 = "_Ah, hello.  I heard most of the story from Mayor Candice.  Anyway, if the Ten Slayer has returned to us, then I trust you.  I guess I'll just get to the point._";
	text2 = "_I've got some questions to ask you.  You know, particulars._";
	text5 = "_Hey.  Again, I'm going to want to ask you some questions.  So..._";
	code = 
		if(get_flag(7,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(7,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 24;
	state = 5;
	nextstate = -1;
	question = "No thanks.";
	text1 = "_Well...  very well, but do get back to me somewhat soon._";
	text2 = "_My patience is not infinite, but very well._";
	text3 = "_Are you purposefully trying my patience?_";
	text4 = "_I've had just about enough of your lollygagging._";
	text5 = "_Why do you bother me so?  Does it give you some perverse pleasure?_";
	text6 = "_Answer, goddamnit!_";
	text7 = "_FINE!  You win.  I admit it-- I'm a crossdresser.  Are you happy?  ARE YOU HAPPY?!_";
	text8 = "_...damn you._";
	action = END_TALK;
	code = 

		if(get_flag(35,0) < 8)
			inc_flag(35,0,1);
		clear_strings();
		if(get_flag(35,0) < 8)
			add_string(get_flag(35,0));
		else
			add_string(8);

break;

begintalknode 25;
	state = 5;
	nextstate = 4;
	question = "Okay.";
	text1 = "Rupert shakes his head.  _Man...  They killed Abidan.  This is not good at all.  Horrible news._";
	text2 = "_Either way, thank you greatly for services rendered._";
	code = 

		reset_dialog();
		add_dialog_str(0,"_You came from the south.  Well, obviously-- it's the only way you could have come from.  My first question is, did you see a farm on your way here, and..._",0);
		if(party_size() == 1)
			add_dialog_str(1,"He's talking about General Abidan's farm, the one I slept in which was cleared out by brigands.  I tell him everything I saw there, up to and including the wreckage.",0);
		else
			add_dialog_str(1,"He's talking about General Abidan's farm, the one we slept in which was cleared out by brigands.  We tell him everything we saw there, up to and including the wreckage.",0);
		add_dialog_str(2,"_Wait, wait.  Hold up.  You're absolutely certain that General Abidan was slain?  Tell me you're kidding._",0);
		if(get_flag(4,0) == 0){
			if(party_size() == 1)
				add_dialog_str(3,"I tell him that no, I didn't see General Abidan's body, but that the farm was fairly soundly ruined and that the family appeared to be slain to a man.  Rupert appears mortified.",0);
			else
				add_dialog_str(3,"We tell him that no, we didn't see General Abidan's body, but that the farm was fairly soundly ruined and that the family appeared to be slain to a man.  Rupert appears mortified.",0);
		}
		else{
			if(party_size() == 1)
				add_dialog_str(3,"I tell him that yes, I did see General Abidan's body, decked in full war regalia, with a large hole bored through his head.  The whole family appeared to be slain with no survivors.  Rupert appears mortified.",0);
			else
				add_dialog_str(3,"We tell him that yes, we did see General Abidan's body, decked in full war regalia, with a large hole bored through his head.  The whole family appeared to be slain with no survivors.  Rupert appears mortified.",0);
		}
		add_dialog_str(4,"_Shit!  Goddamn it.  Abidan is dead.  The great General Field Marshall was slain!  And right after his poor son fell in battle.  What a man-- he was a fighter and a leader for the ages.  He didn't deserve this._",0);
		add_dialog_str(5,"_Listen-- don't tell ANYONE about this.  Just don't.  Hearing of the general's death would be absolutely lethal to this city's morale.  Anyway, thanks for the info._",0);
		add_dialog_choice(0,"But captain, there's more.");
		bmessage = run_dialog(1);

		reset_dialog();
		if(party_size() == 1)
			add_dialog_str(0,"Captain Rupert listens intently as I describe the sniper's roost with the magical device, and how he was guarding the road into the city.",0);
		else
			add_dialog_str(0,"Captain Rupert listens intently as we describe the sniper's roost with the magical device, and how he was guarding the road into the city.",0);
		add_dialog_str(1,"_So these brigands have magical boats, magical snipers, and they've killed one of the former field commanders of all military operations on this entire continent._",0);
		add_dialog_str(2,"_This hardly bodes well, but thank you for your information._",0);
		add_dialog_choice(0,"Right.");
		bmessage = run_dialog(1);

		set_flag(34,0,1);

break;

begintalknode 26;
	state = 4;
	nextstate = -1;
	condition = ((get_flag(31,0) > 0) && (get_flag(31,0) < 3)) && ((get_flag(29,0) == 1) && (get_flag(34,0) >= 1));
	question = "Is there any way to help this city out?";
	text1 = "He chortles.  _Why the hell would you want to do something like that?  Nevermind, I won't ask.  Just..._";
	text2 = "_Well, here's the thing, see?  There's a large brigand army standing immediately outside of our gates.  I'm not letting you charge out there to your inevitable doom._";
	text3 = "_But if you could obtain a boat, it would be possible for you to access a small beach in the brigand's territory.  I doubt you'd be able to help us, so I won't risk the casualties by allowing you to engage the brigand army..._";
	text4 = "_But if you want to go into their territory, it would help.  Of course, killing the brigand army would be miraculous, but I'm confident that you can't do it._";
	text5 = "_You can't leave through the gates of the city because of a squatting army, but going via boat would be feasible, I'd think._";
	code = 
		if(get_flag(8,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(8,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
		if(get_flag(31,0) == 1){
			set_flag(31,0,2);
			toggle_quest(10,1);
		}
break;

begintalknode 27;
	state = 4;
	nextstate = -1;
	condition = (get_flag(31,0) >= 3 && get_flag(34,0) >= 1) && (get_flag(29,0) == 1 && get_flag(23,0) == 0);
	question = "Hoppston is willing to embark on an expedition.";
	text1 = "Rupert nods.  _Well, I wasn't expecting it, but if you want to help us, then feel free.  I just don't know what good you'll be capable of._";
	text2 = "_I know it's not much, but good luck.  You'll be needing it out there._";
	text5 = "_Good luck.  You'll need it._";
	code = 
		if(get_flag(9,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(9,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 28;
	state = 4;
	nextstate = 6;
	condition = (get_flag(34,0) >= 1) && (get_flag(29,0) == 1);
	question = "What are the specifics about the brigand situation?";
	text1 = "_Well, that's a pretty involved question, but I guess I'll give you something of an answer, considering how much you've helped us out._";
	text2 = "_Currently, there's a lot of them.  Hundreds, maybe more.  It's totally inexplicable.  Honestly.  I don't know much about them, other than that they need to be fought and intensely._";
	text3 = "_Currently, there's less of them than there were, but still a lot.  You helped a lot in this respect.  On the other hand, they're still inexplicable and must be fought._";
	text4 = "_They're powerful, almost to the point of being trained, and better organized than most would expect.  Again, I have no real answers._";
	text5 = "_They're totally random, powerful, competent, and lethal.  Anything else about them, you'll have to find out for yourself._";
	text6 = "_As for how we're dealing with them, it's not pretty, but we're surviving still._";
	text7 = "_Since you slew the field commander sitting outside of our gates, the situation has noticeably improved, but not by enough to waste time celebrating it.  Sorry._";
	code = 
		if(get_flag(10,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(10,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}

		if(get_flag(23,0) == 0){
			remove_string(3);
			remove_string(7);
		}
		else{
			remove_string(2);
			remove_string(6);
		}

break;

begintalknode 29;
	state = 6;
	nextstate = -1;
	question = "Where did the brigands come from?";
	text1 = "_Damn, that's a good question.  I'd like to know.  We've captured some of them and asked them where they've came from.  We've gotten answers ranging from provinces to Solaria itself.  It's absolutely impossible to tell._";
	text2 = "_They say that we'll never find their hideout, even if they told us where to look.  They say that we'll never kill their commander.  It's like an alibi that everyone was told to use in case they were captured._";
	text3 = "_They're obviously well-organized, but half of the crap they tell me is obviously them lying through their teeth.  On the other hand, it's the only conclusive information we have.  Sad, hunh?_";
	text5 = "_They claim that they come from all over, and that their hideout is absolutely undiscoverable.  I doubt all of the crap they spew out at me, but it's the only information we have about the situation._";
	code = 
		if(get_flag(11,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(11,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 30;
	state = 6;
	nextstate = -1;
	question = "How did all of this begin?";
	text1 = "_Well one day, the forests were just crawling with brigands.  We didn't think much of it until they had already taken over most of the farmland._";
	text2 = "_Of course, we weren't going to be taken over like sitting ducks, so we began setting up walls before the brigands reached us.  When they did, however, it was astonishing to us all just how many they had gathered._";
	text3 = "_There weren't as many people in town as there were brigands charging that wall.  I'm amazed we survived, in retrospect.  They weren't using all of the resources they had at their disposal._";
	text5 = "_One day they weren't here, the next day they were advancing like a plague.  We were barely able to stave off their attacks where you see the palisades now._";
	code = 
		if(get_flag(12,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(12,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 31;
	state = 6;
	nextstate = -1;
	question = "How well-trained and outfitted are the brigands?";
	text1 = "_Well, you might know this as well as any of us, but it appears as if the brigands have at least some education in both tactics and strategy.  They're certainly more capable fighters than, say, random thugs._";
	text2 = "_Their resources, though, are truly frightening.  They have boats, a magical sniper roost, and weaponry on the level of what the military might use._";
	text3 = "_I honestly do not know how they obtained such high-quality goods, but every victory we have hardly seems to faze them.  It's like a never-ending torrent of men and goods._";
	text5 = "_They've got basic military training.  They know how to fight.  It's their resources that are truly surprising.  I mean, you know this already, but yes:  They've got us pretty squarely outdone._";
	code = 
		if(get_flag(13,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(13,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 32;
	state = 6;
	nextstate = -1;
	condition = get_flag(5,0) == 1;
	question = "A rakshasa seems to be responsible for the brigands.";
	text1 = "I explain to him about the letter found in Abidan's residence, and how a magical being called a 'rakshasa' may be responsible for the occurrences here.";
	text2 = "We explain to him about the letter found in Abidan's residence, and how a magical being called a 'rakshasa' may be responsible for the occurrences here.";
	text3 = "_Are...  are you joking with me?  Do you honestly expect me to believe such a crackpot theory?  What the hell would a superpowerful alien megabeast want with this place?_";
	text4 = "_I understand that the situation here is pretty intense and inexplicable, but petty brigands or rebels might still come here for lumber and farmland.  Deity-like beings?  Not so much._";
	text5 = "_Yeah.  Sure, whatever.  That doesn't change the nature of what we have to do here, so I'm going to do the city the favor of not taking you seriously when you talk like that._";
	code = 
		if(party_size() == 1)
			remove_string(2);
		else
			remove_string(1);
		if(get_flag(14,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(14,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 33;
	state = 4;
	nextstate = -1;
	condition = (get_flag(23,0) >= 2) && (get_flag(29,0) == 1);
	question = "The army outside of the gates is no more.";
	text1 = "_Yes.  Yes, I've heard this.  Thank you.  Honestly.  This isn't the end of our struggles, but it might just be the beginning of our hopes to win them._";
	text2 = "_We don't have much, but what we do have should be yours.  Downstairs in the storerooms, we have our city savings in gold pieces and a semi-precious magical shield.  Feel free to take them._";
	text3 = "_I wish I could give you more, but we just don't have anything else to give.  Except, I suppose, for our unbridled gratitude._";
	text5 = "_Yes.  Again, the whole city thanks you for the deeds you've done._";
	code = 
		if(get_flag(15,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(15,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
		if(get_flag(23,0) < 3){
			set_flag(23,0,3);
			toggle_quest(10,0);
			award_party_xp(500,25);
			award_party_xp(500,25);
			award_party_xp(500,25);
			award_party_xp(500,25);
		}
break;

begintalknode 34;
	state = 4;
	nextstate = -1;
	condition = (get_flag(23,0) >= 1) && (get_flag(29,0) == 1);
	question = "What happened to Hoppston and the Ten Slayer?";
	text1 = "_...well, Hoppston was lucky to be able to transport you to brigand territory, but it is my suspicion that he was tracked by other boats in the area._";
	text2 = "_You had already proven yourself absurdly dangerous, and so the brigands weren't anxious to charge him with you present.  In your absence, however, Hoppston was a sitting duck._";
	text3 = "_You had already proven yourselves absurdly dangerous, and so the brigands weren't anxious to charge him with you present.  In your absence, however, Hoppston was a sitting duck._";
	text4 = "_I suspect Hoppston is dead.  Sorry.  I know he gave his life to help you out, but I can only hope you will appreciate his death for sake of the lives he saved._";
	text5 = "_Sorry.  We haven't heard any more developments.  Strategically, I've already been forced to assume that he's at the bottom of the river._";
	text6 = "...";
	code = 
		if(party_size() == 1)
			remove_string(3);
		else
			remove_string(2);
		if(get_flag(16,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(16,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 35;
	state = 4;
	nextstate = -1;
	condition = (get_flag(63,0) >= 1) && (get_flag(29,0) == 1);
	question = "The brigands have a base burrowed into a hillside, but it's fake.";
	text1 = "I tell him about the mound the brigands have their base in, and that even though the brigands are guarding it, it's not actually their main base of operations, just a way-point.";
	text2 = "We tell him about the mound the brigands have their base in, and that even though the brigands are guarding it, it's not actually their main base of operations, just a way-point.";
	text3 = "_Hm...  Right, this is interesting news.  Still, if they have it guarded, it must be for a purpose.  It's probably where they store their food between here and their 'main' base._";
	text4 = "_Still, I appreciate the information.  Mind you, if we have a chance to use it, things will be in such a good state that we might actually win, but thanks anyway._";
	text5 = "_Yes, yes, I know.  Don't worry, I've marked this down already._";
	code = 
		if(party_size() == 1)
			remove_string(2);
		else
			remove_string(1);
		if(get_flag(17,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(17,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}

		if(get_flag(63,0) == 1){
			award_party_xp(150,25);
			set_flag(63,0,2);
		}

break;

begintalknode 40;
	state = -1;
	nextstate = 8;
	question = "Hoppston";
	text1 = "Hoppston is sitting at the table here, chatting with the man across from him.";
	text2 = "_Ah, you!  Thanks again for the help in safely getting back here.  I can't tell you how close I felt I was to dying._";
	text3 = "_I'm just taking a break for now.  Reconnaissance is dangerous work, and we have mostly up-to-date information, so I don't see any harm in taking a break for now._";
	text5 = "Hoppston is still sitting here, idly biding his time, presumably enjoying the time in-between missions while he still has it.";
	code = 
		if(get_flag(18,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(18,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 41;
	state = 8;
	nextstate = -1;
	question = "What did you do before the brigands came?";
	text1 = "He shakes his head.  _Ah, I was a lone fisherman.  I was good at it, too.  I was able to take the smallest dinghy further than you'd have imagined.  But regardless, those days are over._";
	text2 = "_Now, I have a vessel far greater than any dinghy!  Alas, the circumstances I've obtained it by are desolate indeed._";
	text5 = "_I was a fisherman, with a reliable dinghy.  Ah, those were the days..._";
	code = 
		if(get_flag(19,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(19,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 42;
	state = 8;
	nextstate = -1;
	question = "What do you do other than reconnaissance?";
	text1 = "_Me?  Nothing!  Do you know how-- well, okay.  I suppose you DO know how dangerous it is.  But anyway, yes.  I'm not really obligated to do much after recon._";
	text2 = "_Of course, sometimes I help the newbies with fishing.  And sometimes, when I get bored enough, I just lay down a line and fish.  Sure, things are tense here, but they're also pretty boring._";
	text5 = "_Officially, nothing.  But sometimes, I fish for fun.  Thing is, I can't get into deep waters, you know?_";
	code = 
		if(get_flag(20,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(20,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 43;
	state = 8;
	nextstate = -1;
	condition = party_size() == 1;
	question = "Could you take me back?";
	text1 = "Hoppston shakes his head.  _No, I'm sorry.  It's just way too dangerous.  Why don't you go talk to the Mayor and Captain to see what you can do around here to help?_";

begintalknode 44;
	state = 8;
	nextstate = -1;
	condition = party_size() > 1;
	question = "Could you take us back?";
	text1 = "Hoppston shakes his head.  _No, I'm sorry.  It's just way too dangerous.  Why don't you go talk to the Mayor and Captain to see what you can do around here to help?_";

begintalknode 45;
	state = 8;
	nextstate = 9;
	condition = (party_size() == 1) && (get_flag(31,0) == 2);
	question = "Could you ferry me into brigand territory?";
	text1 = "_This...  This isn't a joke, right?  Are you trying to see if I'm stupid?_";
	text2 = "I tell him that, no, I am not joking with him.";
	text3 = "_F...  fine.  Fine, I'll take you across the waters.  You're crazy, but I know first-hand how good you are, and I'm willing to give you this chance._";
	text4 = "_I'm ready to go now.  Are you ready?_";
	text5 = "_Yeah, the offer's still open.  Are you ready yet?_";
	code = 
		if(get_flag(21,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(21,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 46;
	state = 8;
	nextstate = 9;
	condition = (party_size() > 1) && (get_flag(31,0) == 2);
	question = "Could you ferry us into brigand territory?";
	text1 = "_This...  This isn't a joke, right?  Are you trying to see if I'm stupid?_";
	text2 = "We tell him that, no, we are not joking with him.";
	text3 = "_F...  fine.  Fine, I'll take you across the waters.  You're crazy, but I know first-hand how good you are, and I'm willing to give you this chance._";
	text4 = "_I'm ready to go now.  Are you ready?_";
	text5 = "_Yeah, the offer's still open.  Are you ready yet?_";
	code = 
		if(get_flag(22,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(22,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 47;
	state = 9;
	nextstate = 8;
	question = "No...  not yet.";
	text1 = "_No problem.  Let me know._";

begintalknode 48;
	state = 9;
	nextstate = -1;
	question = "Yes.  Let's go.";
	text1 = "Hoppston silently gets up and begins walking towards Ten Slayer.";
	action = END_TALK;
	code = 
		erase_char(31);
		set_terrain(4,24,409);
		set_flag(31,0,3);
break;

begintalknode 50;
	state = -1;
	nextstate = 10;
	question = "Jewel";
	text1 = "This woman is patiently grinding herbs into a thick, viscous paste in her mortal and pestle.  She's making a potion which, to a city under siege, is of vital importance.";
	text2 = "She looks up at me briefly with confusion.  _You...  You must be new around here, I suppose.  Or are you the one Hoppston was telling me about?_";
	text3 = "She looks up at us briefly with confusion.  _You...  You must be new around here, I suppose.  Or are you the ones Hoppston was telling me about?_";
	text4 = "_My name is Jewel,_ she says, as she sets down her mortal and pestle.  _I'm an herbalist by trade.  Thanks for the help you've given this city._";
	text5 = "Jewel is still working on another potion, eagerly hammering away at what's in her little bowl.";
	code = 
		if(get_flag(23,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(23,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
		if(party_size() == 1)
			remove_string(3);
		else
			remove_string(2);
break;

begintalknode 51;
	state = 10;
	nextstate = -1;
	question = "Jewel-- that's an unusual name.";
	text1 = "She shrugs.  _What can I say?  My folks are very salt-of-the-earth types.  Love of nature and whatnot._";
	text2 = "_I think it's a pretty name.  And even if it's not a pretty name, it's unusual, meaning that people remember it.  You know what I mean?_";
	text5 = "She chuckles.  _You say that, and yet you're going to remember my name long after you're done talking with me, even if my personality isn't anything special._";
	code = 
		if(get_flag(24,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(24,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 52;
	state = 10;
	nextstate = -1;
	question = "Are there ingredients in the area to make potions with?";
	text1 = "_Actually, yes.  Normally, herbalists don't give away their secrets, but I won't be getting outside much anyway, so I'll tell you._";
	text2 = "_The bushes in this region with red berries mark areas particularly fertile.  If you look closely enough and know the tell-tale signs, you should be able to scrounge together some worthy herbs._";
	text5 = "_It's like I said-- just look for the bushes with the red berries, okay?  If you can't find them then, well...  I can't well go outside and look for them with you.  Sorry._";
	code = 
		set_flag(43,0,1);
		if(get_flag(25,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(25,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 53;
	state = 10;
	nextstate = -1;
	question = "How long have you been here?";
	text1 = "_Well, I was just passing through, spending a few days in the area to pick some ingredients.  It was, what, my third day here?  I saw some men marching from the forests.  I waited for them to pass by, concealing myself._";
	text2 = "_I thought they were peculiarly well-organized, but their equipment wasn't the kind used by any soldier I used, so I came to the conclusion that they were particularly devoted bandits or seditious rebels._";
	text3 = "_When they had passed, I made my way back to town and began making potions.  I figured, the soldiers here would want a few after the fighting had ended.  Well, I underestimated the situation by a fair deal, and so here I am.  Still._";
	text5 = "_I've been here since a few days before the brigands came.  It hasn't actually been that long, but it feels like forever.  It's been working me to the bone, too._";
	code = 
		if(get_flag(26,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(26,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 54;
	state = 10;
	nextstate = -1;
	question = "Do you have any spare potions available for purchase?";
	text1 = "You conclude your business.";
	code = 
		if(get_flag(23,0) > 0){
			if(get_flag(56,0) == 0){
				add_item_to_shop(2,220,12);
				add_item_to_shop(2,221,15);
				add_item_to_shop(2,222,8);
				add_item_to_shop(2,225,8);
				add_item_to_shop(2,226,1);
				set_flag(56,0,1);
			}
			begin_shop_mode("Jewel's Potions","Jewel has a sizable stock of potions she has made available.  Plus, she seems to be offering a very generous price for them.",2,0,-1);
		}
		else{
			begin_shop_mode("Jewel's Potions","Jewel has a stock of potions that she hasn't reserved for the soldiers' use.  They all appear to be high-quality too.",2,3,-1);
		}
break;

begintalknode 55;
	state = 10;
	nextstate = -1;
	question = "Do you have any recipes?";
	text1 = "You conclude your business.";
	code = 
		if(get_flag(23,0) > 0)
			begin_shop_mode("Jewel's Recipes","Jewel has a fair number of recipes she knows how to make, and is willing to part with this knowledge at dirt-cheap prices.",1,0,-1);
		else
			begin_shop_mode("Jewel's Recipes","Jewel has a fair number of recipes she knows how to make, and is willing to part with this knowledge for a price.",1,3,-1);
break;

begintalknode 60;
	state = -1;
	nextstate = 12;
	question = "Marie";
	text1 = "This woman is walking around the storeroom with a wooden plank in her hand with many stapled sheets of paper attached to it.  She seems busy, constantly marking things off on her paper and looking at things.";
	text2 = "_You.  I heard a little about you.  The name's Marie...  I'm in charge of inventory here.  Now, if you'll excuse me..._";
	text3 = "Hunh.  She seems quite busy.";
	text5 = "Marie is still diligently inventorying the goods around her.";
	code = 
		if(get_flag(27,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(27,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 61;
	state = 12;
	nextstate = -1;
	question = "What do you inventory?";
	text1 = "_Things.  Lumber, food, equipment...  Things we need for survival.  Mostly, my job is to make sure that we eat the oldest of the food we catch as soon as possible before it spoils._";
	text2 = "_Food is at a premium here.  Keeping a city alive while separated from outside traders and the farms outside of our gates is not easy._";
	text5 = "_You already asked me that, and the answer hasn't changed since._";
	text6 = "How terse.";
	code = 
		if(get_flag(28,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(28,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 62;
	state = 12;
	nextstate = -1;
	question = "Do you have anything available for purchase?";
	text1 = "_What do I look like, a merchant?  Do I have a sign hanging from my neck saying, 'whatever little I have, take'?_";
	text2 = "_Whatever we have, we're using.  If Mayor Candice says you can have something, then take it.  Otherwise, you should probably just assume that we're not going to give you anything, mostly because we just don't have it._";
	text5 = "_Damnit...  no!  Take whatever you have permission to, but we cannot part with anything else, do you understand?_";
	code = 
		if(get_flag(29,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(29,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 63;
	state = 12;
	nextstate = -1;
	condition = party_size() == 1;
	question = "Can I sell anything to you?";
	text1 = "You conclude your business.";
	code = 
		begin_shop_mode("Sunset Creek Warehouse","Sunset Creek is pretty hard-up for goods.  The city doesn't have much in terms of money, but what it does have, it would easily part with for some direly-needed supplies.",3,6,6);
break;

begintalknode 64;
	state = 12;
	nextstate = -1;
	condition = party_size() > 1;
	question = "Can we sell anything to you?";
	text1 = "You conclude your business.";
	code = 
		begin_shop_mode("Sunset Creek Warehouse","Sunset Creek is pretty hard-up for goods.  The city doesn't have much in terms of money, but what it does have, it would easily part with for some direly-needed supplies.",3,6,6);
break;

begintalknode 65;
	state = 12;
	nextstate = -1;
	question = "Can you identify some of these items?";
	text1 = "_Sure, why not.  I've seen a lot of crazy stuff floating in and out of here as of late; your goods should be no exception._";
	text2 = "_For fifteen gold apiece, I can tell you whatever you're carrying is._";
	action = ID 15;

begintalknode 70;
	state = -1;
	nextstate = 14;
	question = "Albert";
	text1 = "This man wears the robes of a priest.  He looks rather exhausted, though, and his altar is clearly a very temporary affair, consisting of some unlit incense, a candle, and an empty glass.";
	text2 = "_Hello, there...  My name is Alfred.  Welcome to this, well...  temorary shrine, of sorts.  I wish I could offer you a better resting place, but..._";
	text3 = "_Oh, look at me natter on.  If you're interested in healing, solace, or...  well, why don't you just tell me why you're here?_";
	text5 = "Albert is still quietly sitting in reflection in his incredibly cramped quasi-shrine.";
	code = 
		if(get_flag(30,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(30,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 71;
	state = 14;
	nextstate = -1;
	question = "Why are you here?";
	text1 = "_Well...  I could have left with the rest of the merchants, but I suspect that I was fortunate to have chosen not to do so._";
	text2 = "_As for me, I decided to linger about and heal the soldiers who were getting injured in the first skirmishes.  I had no idea things would get this bad, but they have.  And now my only option is to stick around._";
	text5 = "_I'm here because I though I would be able to leave.  Well, also to help people._";
	code = 
		if(get_flag(31,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(31,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 72;
	state = 14;
	nextstate = -1;
	question = "What god do you follow?";
	text1 = "_I'd rather not answer.  You see, not everyone follows the same deity, and some people take offense if you follow deities that they don't like much._";
	text2 = "_If I worship a generic deity, or at least say that I do, then people will be more willing to accept my healing.  It's a general rule of thumb for wandering healers like myself._";
	text3 = "_I hope that answers your question._";
	text5 = "_I worship someone, alright...  but I'm not going to go about advertising it, if you know what I mean._";
	code = 
		if(get_flag(32,2) == 0){
			remove_string(5);
			remove_string(6);
			remove_string(7);
			remove_string(8);
			set_flag(32,2,1);
		}
		else{
			remove_string(1);
			remove_string(2);
			remove_string(3);
			remove_string(4);
		}
break;

begintalknode 73;
	state = 14;
	nextstate = -1;
	question = "Can you teach any spells?";
	text1 = "You conclude your business.";
	code = 
		begin_shop_mode("Albert's Spells","Albert has a sharply limited quality of spells that he can cast.  Very limited.  Almost comically so.  They might be useful, though...",4,0,-1);
break;

begintalknode 74;
	state = 14;
	nextstate = -1;
	question = "Some healing would be nice...";
	text1 = "_Well, if you say so..._";
	text2 = "Alfred puts his palms together and begins muttering.  Suddenly, wave upon wave of healing energy passes over me.";
	text3 = "Alfred puts his palms together and begins muttering.  Suddenly, wave upon wave of healing energy passes over us.";
	text4 = "_There.  That should do it.  Now if you'll excuse me, I need a rest after that._";
	text5 = "_No, no.  I still need some time to rest up._";
	text6 = "_You...  you're not hurt.  Honestly, you'll be fine._";
	code = 
		if(get_flag(17,1) == 0){
			remove_string(5);
			heal_rest = 0;
			pcs = 0;
			living_pcs = party_size();
			while(pcs <= 3){
				if(char_ok(pcs) == TRUE){
					heal_rest = (heal_rest + (get_max_health(pcs) - get_health(pcs)));
					heal_rest = (heal_rest + get_char_status(pcs,0));
					heal_rest = (heal_rest + get_char_status(pcs,12));
					heal_rest = (heal_rest + (get_char_status(pcs,12) * 10));
					restore_pc(pcs);
				}

				pcs = (pcs + 1);
			}
			revive_party();
			living_pcs = (party_size() - living_pcs);
			heal_rest = (heal_rest + (living_pcs * 200));

			if(heal_rest > 0){
				if(party_size() == 1)
					remove_string(3);
				else
					remove_string(2);
				remove_string(6);
				set_flag(17,1,(heal_rest / 100));
				if(get_flag(17,1) == 0)
					set_flag(17,1,1);
			}
			else{
				remove_string(1);
				remove_string(2);
				remove_string(3);
				remove_string(4);
			}
		}
		else{
				remove_string(1);
				remove_string(2);
				remove_string(3);
				remove_string(4);
				remove_string(6);
		}
break;

